<?php

namespace App;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;

class Cart extends Model
{
    protected $guarded=[];

    public function skus()
    {
        return $this->belongsTo(Sku::class,'sku_id','id');
    }
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
    public function sku()
    {
        return $this->belongsTo(Sku::class,'sku_id','id');
    }
    public function goods()
    {
        return $this->belongsTo(Goods::class,'goods_id','id');
    }
}
